package com.cesgroup.zw.spring.boot.library.echarts.barAndPie.simple;

import com.cesgroup.zw.spring.boot.echarts.build.EChartsOption;
import com.cesgroup.zw.spring.boot.echarts.component.Legend;
import com.cesgroup.zw.spring.boot.echarts.component.Title;
import com.cesgroup.zw.spring.boot.echarts.component.Tooltip;
import com.cesgroup.zw.spring.boot.echarts.component.axis.XAxis;
import com.cesgroup.zw.spring.boot.echarts.component.axis.YAxis;

/**
 * <p>多彩柱形+饼图</p>
 * @author ytj
 * @date 2019/7/8 14:11
 */
@SuppressWarnings("serial")
public class BarAndPieSimpleOption extends EChartsOption{
    public BarAndPieSimpleOption(BarAndPieSimpleParam param){
        this.setLegend(new Legend(){{
            this.setData(param.getDataset().get("name"));
        }});
        this.setXAxis(new XAxis(){{
            this.setData(param.getDataset().get("name"));
        }});
        this.setTitle(new Title(){{
            this.setText("多彩柱形+饼图");
        }});
        this.setTooltip(new Tooltip());
        this.setYAxis(new YAxis());
    }
}
